package com.ccut.xunfeiSpringboot.mapper;

import com.ccut.xunfeiSpringboot.entity.CalendarEvent;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CalendarEventMapper {
    @Insert("insert into calendar_event (title, start, end, description, rrule, user_id) values (#{title}, #{start}, #{end}, #{description}, #{rrule}, #{userId})")
    void insert(CalendarEvent event);

    @Select("select * from calendar_event where user_id = #{userId}")
    List<CalendarEvent> getAll(Integer userId);
}
